<template>
    <div>
        <!-- 出售列表 -->
        <div class="margin-top-10 margin-left-10 title" style="color: #7f7272;" v-show="userName">{{ date+' | '+userName+'/'+'出售'+' | 总计：'+money+'元' }}</div>
        <van-card v-for="(item,index) in productLists" :key="index" class="margin-top-10 bora-10" :tag="item.tag"
            :num="item.num" :price="item.price" :desc="item.desc" :title="item.title" :thumb="item.thumb">
            <template #tags>
                <van-tag color="#78b888" v-for="(tag, index) in item.tags" :key="index">{{ tag }}</van-tag>
            </template>
        </van-card>
    </div>
</template>
<script>
export default {
    name:'App',
    data(){
        return{
            date:'',
            money:'',
            userName:'',
            productLists:[
                {
                    thumb:require('../../assets/home_img/01.jpg'),
                    desc:'图片',
                    title:'入木三分',
                    price:'1200.00',
                    num:'5',
                    tag:'降价',
                    tags:['2024-08-19 11:16'],//标签
                    footer:['申请售卖'],//按钮
                },
                {
                    thumb:require('../../assets/home_img/02.jpg'),
                    desc:'楠木 高40 宽26 厚18',
                    title:'明代木雕·张天师',
                    price:'5000.00',
                    num:'5',
                    tag:'降价',
                    tags:['张三 | 代理中'],//标签
                    footer:['申请售卖'],//按钮
                },
                {
                    thumb:require('../../assets/home_img/03.jpg'),
                    desc:'描述信息',
                    title:'标题',
                    price:'20000.00',
                    num:'5',
                    tag:'降价',
                    tags:['张三 | 代理中'],//标签
                    footer:['申请售卖'],//按钮
                },
                {
                    thumb:require('../../assets/home_img/04.jpg'),
                    desc:'描述信息',
                    title:'标题',
                    price:'2220.00',
                    num:'5',
                    tag:'降价',
                    tags:['张三 | 代理中'],//标签
                    footer:['申请售卖'],//按钮
                },
                {
                    thumb:require('../../assets/home_img/05.jpg'),
                    desc:'描述信息',
                    title:'标题',
                    price:'9800.00',
                    num:'5',
                    tag:'降价',
                    tags:['张三 | 代理中'],//标签
                    footer:['申请售卖'],//按钮
                },
                {
                    thumb:require('../../assets/home_img/06.jpg'),
                    desc:'描述信息',
                    title:'标题',
                    price:'3200.00',
                    num:'5',
                    tag:'降价',
                    tags:['张三 | 代理中'],//标签
                    footer:['申请售卖'],//按钮
                },
            ],
        }
    },
    created(){
        if(this.$route.query.name){
            console.log(this.$route.query)
            this.userName=this.$route.query.name;
            this.money=this.$route.query.money;
            let date=new Date()
            this.date=date.getFullYear()+'-'+(date.getMonth()+1)+'-'+(date.getDate()-1)
        }
        
    }
}
</script>
<style>
    .title{
        font-size: 13px;
    }
</style>